package service.impl;

import dao.AccountDao;
import pojo.Account;
import service.AccountService;
import utils.BeanFactory;

public class AccountServiceImpl implements AccountService {
    /**
     * 保存账户：参数传递JavaBean对象
     */
    @Override
    public void saveAccount(Account account) {
        //业务层不要直接new对象，从对象工厂中获取
        AccountDao accountDao = BeanFactory.getInstance(AccountDao.class);
        accountDao.saveAccount(account);
    }
}
